package com.sunnyebuy.merchant.po;

import java.io.Serializable;
import java.math.BigDecimal;
import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * The persistent class for the customer_order_product_detail database table.
 * 
 */
@Entity
@Table(name = "customer_order_product_detail")
public class CustomerOrderProductDetail implements Serializable {

	private static final long serialVersionUID = 7016763557580905122L;
	private String orderProductDetailId;
	private Timestamp createdTime;
	private BigDecimal merchantProductAmount;
	private BigDecimal merchantProductDiscountAmount;
	private BigDecimal merchantProductNetpriceAmount;
	private String merchantProductSku;
	private int productCount;
	private String productName;
	private BigDecimal productPrice;
	private int returnedCount;
	private int salesChannelType;
	private int shippedCount;
	private String supplierProductSku;
	private CustomerOrder customerOrder;

	public CustomerOrderProductDetail() {
	}

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "order_product_detail_id")
	public String getOrderProductDetailId() {
		return this.orderProductDetailId;
	}

	public void setOrderProductDetailId(String orderProductDetailId) {
		this.orderProductDetailId = orderProductDetailId;
	}

	@Column(name = "created_time")
	public Timestamp getCreatedTime() {
		return this.createdTime;
	}

	public void setCreatedTime(Timestamp createdTime) {
		this.createdTime = createdTime;
	}

	@Column(name = "merchant_product_amount")
	public BigDecimal getMerchantProductAmount() {
		return this.merchantProductAmount;
	}

	public void setMerchantProductAmount(BigDecimal merchantProductAmount) {
		this.merchantProductAmount = merchantProductAmount;
	}

	@Column(name = "merchant_product_discount_amount")
	public BigDecimal getMerchantProductDiscountAmount() {
		return this.merchantProductDiscountAmount;
	}

	public void setMerchantProductDiscountAmount(BigDecimal merchantProductDiscountAmount) {
		this.merchantProductDiscountAmount = merchantProductDiscountAmount;
	}

	@Column(name = "merchant_product_netprice_amount")
	public BigDecimal getMerchantProductNetpriceAmount() {
		return this.merchantProductNetpriceAmount;
	}

	public void setMerchantProductNetpriceAmount(BigDecimal merchantProductNetpriceAmount) {
		this.merchantProductNetpriceAmount = merchantProductNetpriceAmount;
	}

	@Column(name = "merchant_product_sku")
	public String getMerchantProductSku() {
		return this.merchantProductSku;
	}

	public void setMerchantProductSku(String merchantProductSku) {
		this.merchantProductSku = merchantProductSku;
	}

	@Column(name = "product_count")
	public int getProductCount() {
		return this.productCount;
	}

	public void setProductCount(int productCount) {
		this.productCount = productCount;
	}

	@Column(name = "product_name")
	public String getProductName() {
		return this.productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	@Column(name = "product_price")
	public BigDecimal getProductPrice() {
		return this.productPrice;
	}

	public void setProductPrice(BigDecimal productPrice) {
		this.productPrice = productPrice;
	}

	@Column(name = "returned_count")
	public int getReturnedCount() {
		return this.returnedCount;
	}

	public void setReturnedCount(int returnedCount) {
		this.returnedCount = returnedCount;
	}

	@Column(name = "sales_channel_type")
	public int getSalesChannelType() {
		return this.salesChannelType;
	}

	public void setSalesChannelType(int salesChannelType) {
		this.salesChannelType = salesChannelType;
	}

	@Column(name = "shipped_count")
	public int getShippedCount() {
		return this.shippedCount;
	}

	public void setShippedCount(int shippedCount) {
		this.shippedCount = shippedCount;
	}

	@Column(name = "supplier_product_sku")
	public String getSupplierProductSku() {
		return this.supplierProductSku;
	}

	public void setSupplierProductSku(String supplierProductSku) {
		this.supplierProductSku = supplierProductSku;
	}

	@ManyToOne(fetch = FetchType.LAZY,cascade={CascadeType.ALL})
	@JoinColumn(name = "order_id")
	public CustomerOrder getCustomerOrder() {
		return this.customerOrder;
	}

	public void setCustomerOrder(CustomerOrder customerOrder) {
		this.customerOrder = customerOrder;
	}

}